import { Suspense } from 'react';
import { useRoutes } from 'react-router-dom';
import routers from './router';
function App() {
  // 使用 useRoutes 获取路由组件
  const element = useRoutes(routers);
  return (
    <div className="App">
      <Suspense fallback={<div>loading...</div>}>{element}</Suspense>
    </div>
  );
}

export default App;
